package com.luban.hs.smo;

import com.luban.hs.dao.OfferDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author: hs
 * @Description:
 * @Date: Create in 20:34 2019/2/25
 */
@Component
public class OfferTxSmoImpl implements OfferTxSmo {

    @Autowired
    OfferDao offerDao;

    @Autowired
    OfferSmo offerSmo;

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void insertOffer() {
        offerSmo.insertOfferTwo();
        offerDao.insertOffer();
    }
}
